package com.work.service.main;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.work.dto.main.OneStockTallyAppSubmitBatchDTO;
import com.work.dto.main.OneStockTallyAppSubmitDTO;
import com.work.dto.main.OneStockTallyCorrectSubmitDTO;
import com.work.dto.main.OneStockTallySearchDTO;
import com.work.entity.main.OneStockTally;
import com.work.vo.ShiftInfoForAssignWorkVO;
import com.work.vo.main.*;
import org.springblade.core.mp.base.BaseService;
import org.springblade.core.secure.BladeUser;

import java.util.List;

/**
 * 单垛理货接口
 *
 * @author ：dujianyu
 * @since ：Created in 2024/3/12 8:48
 */
public interface IOneStockTallyService extends BaseService<OneStockTally> {

    /**
     * app提交
     * @param dto 提交数据
     * @return  boolean
     * @author dujianyu
     * @since 2024/3/12 9:16
     */
    boolean submitOneStockTally(OneStockTallyAppSubmitDTO dto);

    /**
     * app批量提交
     * @param dto 提交数据
     * @return boolean
     * @author dujianyu
     * @since 2024/7/11 14:40
     */
    boolean submitOneStockTallyBatch(OneStockTallyAppSubmitBatchDTO dto);

    /**
     * 单垛理货历史分页
     * @param  page 分页
     * @param  dto 搜索条件
     * @return IPage<OneStockTallyVO>
     * @author dujianyu
     * @since 2024/3/20 10:09
     */
    IPage<OneStockTallyVO> selectOsTallyHistoryPage(IPage<OneStockTallyVO> page, OneStockTallySearchDTO dto);

    /**
     * 删除
     * @param id 主键ID
     * @return boolean
     * @author dujianyu
     * @since 2024/3/29 10:00
     */
    boolean removeOneStockTally(Long id);

    /**
     * 审核分页
     * @param page 分页
     * @param dto 搜索条件
     * @return IPage<OneStockTallyCheckVO>
     * @author dujianyu
     * @since 2024/6/7 9:55
     */
    IPage<OneStockTallyCheckVO> selectCheckPage(IPage<OneStockTallyCheckVO> page, OneStockTallySearchDTO dto);

    /**
     * 检算确认
     * @param id 主键Id
     * @return boolean
     * @author dujianyu
     * @since 2024/6/7 14:12
     */
    String changeIsCheck(String id);

    /**
     * 检算修正
     * @param dto 数据
     * @return boolean
     * @author dujianyu
     * @since 2024/6/11 9:33
     */
    boolean correctPieceTon(OneStockTallyCorrectSubmitDTO dto);

    /**
     * 解锁分页
     * @param page 分页
     * @param dto 搜索条件
     * @return IPage<OneStockTallyUnlockVO>
     * @author dujianyu
     * @since 2024/6/14 10:13
     */
    IPage<OneStockTallyUnlockVO> selectUnlockPage(IPage<OneStockTallyUnlockVO> page, OneStockTallySearchDTO dto);

    /** 
     * 更改可编辑
     * @param id 主键ID
     * @return String
     * @author dujianyu
     * @since 2024/6/14 15:11
     */ 
    String changeIsEdit(String id);

    /**
     * 详情
     * @param dto 搜索条件
     * @return OneStockTallyUnlockDetailVO
     * @author dujianyu
     * @since 2024/6/17 15:06
     */
    OneStockTallyUnlockDetailVO selectOstDetail(OneStockTallySearchDTO dto);

    /**
     * 船统计检算详情
     * @param dto 搜索条件
     * @return OneStockTallyShipStatCheckDetail
     * @author dujianyu
     * @since 2024/7/1 11:09
     */
    OneStockTallyShipStatCheckDetail selectShipStatCheckDetail(OneStockTallySearchDTO dto);

    /**
     * 工班查询与导出
     * @param page 分页
     * @param dto 搜索条件
     * @return IPage<OneStockTallySearchExportVO>
     * @author dujianyu
     * @since 2024/7/2 11:00
     */
    IPage<OneStockTallySearchExportVO> selectTallySearchExportPage(IPage<OneStockTallySearchExportVO> page, OneStockTallySearchDTO dto);

    /**
     * 工班查询与导出统计
     * @param dto 搜索条件
     * @return TotalPieceTonVO
     * @author dujianyu
     * @since 2024/7/4 10:10
     */
    TotalPieceTonVO selectTallySearchExportTotal(OneStockTallySearchDTO dto);

    ShiftInfoForAssignWorkVO shiftInfoByArrangeId(Long arrangeId);

    List<ShiftInfoForAssignWorkVO> listTallyInfoByArrangeId(ShiftInfoForAssignWorkVO vo);
}
